<?php
$queEmp = "SELECT alias FROM usuari WHERE alias='$usuari'";
	$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
	$totEmp = mysql_num_rows($resEmp);
	if ($totEmp > 0) {
		echo "
				<script>
alert('Nom de usuari no disponible');
				</script>
				";
		header("refresh:0; url=index.php");
		exit();
	}

	$queEmp = "SELECT email FROM usuari WHERE email='$email'";
	$resEmp = mysql_query($queEmp, $conexion) or die(mysql_error());
	$totEmp = mysql_num_rows($resEmp);
	if ($totEmp > 0) {
		echo "
				<script>
alert('El email ingressat no esta disponible');
				</script>
				";
		header("refresh:0; url=index.php");
		exit();
	}

?>